//
//  SelectPhotoCell.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/4/24.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit

class SelectPhotoCell: BaseTableViewCell {
    lazy var backImageView:UIImageView = {
        let view = UIImageView()
        view.image = UIImage(named: "selectPhoto")
        return view
    }()
    
    lazy var photoImageView: UIImageView = {
        let view = UIImageView()
//        view.clipsToBounds = true
//        view.contentMode = UIViewContentMode.scaleAspectFill
        return view
    }()
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setUpUI() -> Void {
        self.contentView.addSubview(backImageView)
        backImageView.snp.makeConstraints { (make) in
            make.width.equalTo(245)
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview()
        }
        
        backImageView.addSubview(photoImageView)
        photoImageView.frame = CGRect(x: 18, y: 11, width: 209, height: 128)
//        photoImageView.snp.makeConstraints { (make) in
//            make.top.equalToSuperview().offset(11)
//            make.left.equalToSuperview().offset(18)
//            make.width.equalTo(209)
//            make.height.equalTo(138)
//        }
        
    }
    
    
    @objc func selectPhoto(sender:UIButton) ->Void {
        
//        SelectPhotoManager.manager.selectPhoto(dataSource: dataSource, maximum: 3, haveNb: 1) { (arr) in
//
//        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
        
        

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
